export interface Action {
  id?: string;
  code: string;
  name: string;
}
export interface Role {
  id?: string;
  code: string;
  name: string;
  level: number;
  factory?: string;
  actions?: Action[]
}

export interface Department {
  id?: string;
  code: string;
  name: string;
  description?: string,
  factory?: string;
}

export interface UserInfo {
  id?: string;
  username: string;
  name: string;
  email?: string;
  age?: number;
  sex?: number;
  phone?: string;
  portrait?: string;
  entryDate?: string;
  remark?: string;
  freeze?: number;
  lastLoginTime?: string;
  identity?: string;
  token?: string;
  factory?: string;
  factoryList?: string[];
  roles?: Role[];
  departments?: Department[];
}

export interface MenuMeta {
  title: string;
  icon?: string;
}

export interface MenuRoute {
  id: string;
  name: string;
  path: string,
  title: string;
  icon?: string;
  sort: number;
  mount?: string;
  component?: string;
  refreshClosed: number;
  parentId: string;
  children?: MenuRoute[];
  redirect?: string;
  meta?: MenuMeta;
  factorys: string[];
  [key: string]: any;
}

